package com.lysky.selfllm.controller.config;

import dev.langchain4j.data.segment.TextSegment;
import dev.langchain4j.store.embedding.EmbeddingStore;
import dev.langchain4j.store.embedding.opensearch.OpenSearchEmbeddingStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EmbeddingStoreConfig {

    @Bean
    public EmbeddingStore<TextSegment> embeddingStore(){
        return OpenSearchEmbeddingStore.builder()
                .serverUrl("http://localhost:9200")
                .indexName("embeddings")
                .build();
    }
}
